package org.dylan.security.util;

import org.dylan.security.entity.IUser;
import org.dylan.security.shiro.realm.SecurityRealm.Principal;

public class SecurityUtils extends org.apache.shiro.SecurityUtils {
	public static IUser getUser() {
		Principal principal = (Principal) org.apache.shiro.SecurityUtils
				.getSubject().getPrincipal();
		return principal != null ? principal.getUser() : null;
	}
}
